package com.kefu.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.kefu.model.SystemUser;

public interface SystemUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SystemUser record);

    int insertSelective(SystemUser record);

    SystemUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SystemUser record);

    int updateByPrimaryKey(SystemUser record);
    @Select("select * from systemuser where state='inline' order by customer asc")
	List<SystemUser> findOnLineSystemUsers();
    @Update("update systemuser set customer=customer+#{num} where id=#{id}")
	void updateSystemCustomUser(@Param("id")Integer id,@Param("num")int i);
    @Select("select count(1) from systemuser where name = #{name}")
	int countName(@Param("name")String name);
    @Select("select * from systemuser order by customer asc")
	List<SystemUser> findAll();
    
}